home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / Examples ƒ / ICHelloCruelWorld / IC Headers ƒ / IC Component API.h < prev    next >
Encoding:
Text File  |  1995-11-18  |  7.3 KB  |  148 lines  |  [TEXT/SPM ]

  1.   Monday, 25 September 1995, 19:28:12
  2.  * 
  3.  * This file is part of the Internet Configuration system and
  4.  * is placed in the public domain for the benefit of all.
  5.  */
  6.  
  7. #ifndef __H_IC_Component_API__
  8. #define __H_IC_Component_API__
  9.  
  10. #include <Components.h>
  11.  
  12. #include "IC Types.h"
  13. #include "IC Keys.h"
  14.  
  15. #include "IC Component Selectors.h"
  16.  
  17. #if 0
  18. // routine descriptions
  19. #include "IC Component API Descriptions.h"
  20. #endif
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. /* ***** Starting Up and Shutting Down ***** */
  27.  
  28. pascal ICError ICCStart(internetConfigurationComponent* inst,OSType creator);
  29. pascal ICError ICCStop(internetConfigurationComponent inst);
  30.  
  31. pascal ICError ICCStartComponent(internetConfigurationComponent inst,OSType creator) \
  32.     ComponentCallNow(kICCStart,4);
  33. pascal ICError ICCStopComponent(internetConfigurationComponent inst) \
  34.     ComponentCallNow(kICCStop,0);
  35.  
  36. pascal ICError ICCGetComponentInstance(internetConfigurationComponent inst,Ptr* component_inst);
  37.  
  38. /* ***** Specifying a Configuration ***** */
  39.  
  40. pascal ICError ICCFindConfigFile(internetConfigurationComponent inst,short count,ICDirSpecArrayPtr folders) \
  41.     ComponentCallNow(kICCFindConfigFile,6);
  42. pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst,ICDirSpec* where) \
  43.     ComponentCallNow(kICCFindUserConfigFile,4);
  44. pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst,Boolean search_prefs,Boolean can_create,short count,ICDirSpecArrayPtr folders) \
  45.     ComponentCallNow(kICCGeneralFindConfigFile,10);
  46. pascal ICError ICCChooseConfig(internetConfigurationComponent inst) \
  47.     ComponentCallNow(kICCChooseConfig,0);
  48. pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst) \
  49.     ComponentCallNow(kICCChooseNewConfig,0);
  50. pascal ICError ICCGetConfigName(internetConfigurationComponent inst,Boolean longname,StringPtr name) \
  51.     ComponentCallNow(kICCGetConfigName,6);
  52. pascal ICError ICCGetConfigReference(internetConfigurationComponent inst,ICConfigRefHandle ref) \
  53.     ComponentCallNow(kICCGetConfigReference,4);
  54. pascal ICError ICCSetConfigReference(internetConfigurationComponent inst,ICConfigRefHandle ref,long flags) \
  55.     ComponentCallNow(kICCSetConfigReference,8);
  56. pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst,FSSpec* config) \
  57.     ComponentCallNow(kICCSpecifyConfigFile,4);
  58.  
  59. /* ***** Getting Information ***** */
  60.  
  61. pascal ICError ICCGetSeed(internetConfigurationComponent inst,long* seed) \
  62.     ComponentCallNow(kICCGetSeed,4);
  63. pascal ICError ICCGetPerm(internetConfigurationComponent inst,ICPerm* perm) \
  64.     ComponentCallNow(kICCGetPerm,4);
  65. pascal ICError ICCDefaultFileName(internetConfigurationComponent inst,StringPtr name) \
  66.     ComponentCallNow(kICCDefaultFileName,4);
  67.  
  68. /* ***** Reading and Writing Preferences ***** */
  69.  
  70. pascal ICError ICCBegin(internetConfigurationComponent inst,ICPerm perm) \
  71.     ComponentCallNow(kICCBegin,2);
  72. pascal ICError ICCGetPref(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Ptr buf,long* size) \
  73.     ComponentCallNow(kICCGetPref,16);
  74. pascal ICError ICCSetPref(internetConfigurationComponent inst,StringPtr key,ICAttr attr,Ptr buf,long size) \
  75.     ComponentCallNow(kICCSetPref,16);
  76. pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Handle prefh) \
  77.     ComponentCallNow(kICCFindPrefHandle,12);
  78. pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr* attr,Handle* prefh) \
  79.     ComponentCallNow(kICCGetPrefHandle,12);
  80. pascal ICError ICCSetPrefHandle(internetConfigurationComponent inst,StringPtr key,ICAttr attr,Handle prefh) \
  81.     ComponentCallNow(kICCSetPrefHandle,12);
  82. pascal ICError ICCCountPref(internetConfigurationComponent inst,long* count) \
  83.     ComponentCallNow(kICCCountPref,4);
  84. pascal ICError ICCGetIndPref(internetConfigurationComponent inst,long n,StringPtr key) \
  85.     ComponentCallNow(kICCGetIndPref,8);
  86. pascal ICError ICCDeletePref(internetConfigurationComponent inst,StringPtr key) \
  87.     ComponentCallNow(kICCDeletePref,4);
  88. pascal ICError ICCEnd(internetConfigurationComponent inst) \
  89.     ComponentCallNow(kICCEnd,0);
  90. pascal ICError ICCEditPreferences(internetConfigurationComponent inst,StringPtr key) \
  91.     ComponentCallNow(kICCEditPreferences,4);
  92.  
  93. /* ***** URL Handling ***** */
  94.  
  95. pascal ICError ICCParseURL(internetConfigurationComponent inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd,Handle url) \
  96.     ComponentCallNow(kICCParseURL,24);
  97. pascal ICError ICCLaunchURL(internetConfigurationComponent inst,StringPtr hint,Ptr data,long len,long* selStart,long* selEnd) \
  98.     ComponentCallNow(kICCLaunchURL,20);
  99.  
  100. /*
  101.     ***** Mappings Routines *****
  102.     
  103.     Routines for interrogating mappings database.
  104.     
  105.     ----- High Level Routines -----
  106. */
  107.  
  108. pascal ICError ICCMapFilename(internetConfigurationComponent inst,StringPtr filename,ICMapEntry* entry) \
  109.     ComponentCallNow(kICCMapFilename,8);
  110. pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry) \
  111.     ComponentCallNow(kICCMapTypeCreator,16);
  112.  
  113. /* ----- Mid Level Routines ----- */
  114.  
  115. pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst,Handle entries,StringPtr filename,ICMapEntry* entry) \
  116.     ComponentCallNow(kICCMapEntriesFilename,12);
  117. pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst,Handle entries,OSType fType,OSType fCreator,StringPtr filename,ICMapEntry* entry) \
  118.     ComponentCallNow(kICCMapEntriesTypeCreator,20);
  119.  
  120. /* ----- Low Level Routines ----- */
  121.  
  122. pascal ICError ICCCountMapEntries(internetConfigurationComponent inst,Handle entries,long* count) \
  123.     ComponentCallNow(kICCCountMapEntries,8);
  124. pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst,Handle entries,long ndx,long* pos,ICMapEntry* entry) \
  125.     ComponentCallNow(kICCGetIndMapEntry,16);
  126. pascal ICError ICCGetMapEntry(internetConfigurationComponent inst,Handle entries,long pos,ICMapEntry* entry) \
  127.     ComponentCallNow(kICCGetMapEntry,12);
  128. pascal ICError ICCSetMapEntry(internetConfigurationComponent inst,Handle entries,long pos,ICMapEntry* entry) \
  129.     ComponentCallNow(kICCSetMapEntry,12);
  130. pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst,Handle entries,long pos) \
  131.     ComponentCallNow(kICCDeleteMapEntry,8);
  132. pascal ICError ICCAddMapEntry(internetConfigurationComponent inst,Handle entries,ICMapEntry* entry) \
  133.     ComponentCallNow(kICCAddMapEntry,8);
  134.  
  135. #ifdef __cplusplus
  136. }
  137. #endif
  138.  
  139. #endif /* __H_IC_Component_API__ */
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.